#!/bin/bash
main(){
    mysql_status=/home/mysql/mysql-status.pid
    if [ ! -f "$mysql_status" ]; then
        sh /home/mysql/setup.sh
    fi
    set -e
    echo `service mysql status`
    echo '启动mysql'
    service mysql start

    echo `service mysql status`
    echo 'mysql 容器启动完毕，且数据导入成功'
    tail -f /dev/null
}
main